{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "import cifar10,cifar10_input\n",
    "import tensorflow as tf\n",
    "import numpy as np\n",
    "import time\n",
    "\n",
    "max_step = 3000\n",
    "batch_size = 100\n",
    "data_dir = '../tmp/cifar10_data/cifar-10-batches-bin'\n",
    "\n",
    "def variable_with_weights_loss(shape , stddev , wl ):\n",
    "    var = tf.Variable(tf.truncated_normal(shape = shape , stddev = stddev))\n",
    "    if wl is not None:\n",
    "        weight_loss = tf.multiply(tf.nn.l2_loss(var), wl ,name = 'weight_loss')\n",
    "        tf.add_to_collection('losses' , weight_loss)\n",
    "    return var\n",
    "\n",
    "cifar10.maybe_download_and_extract()\n",
    "\n",
    "images_train,labels_train = cifar10_input.distorted_inputs(data_dir = data_dir , batch_size = batch_size)\n",
    "images_test,labels_test = "
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.4"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
